/* 关键帧动画
1.定义动画  @keyframes 动画名{}
2.调用动画  animation: 动画名 3s
*/

.box1 {
    width: 100px;
    height: 100px;
    background-color: red;
    border-radius: 50%;
    /* 动画名 一次动画的时间 次数(infinite)*/
    animation: mymove 2s infinite 3s linear;

}

/* 定义动画 */
@keyframes mymove {

    /* 开始 */
    /* from {
        transform: translateX(0);
    } */
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(500px);
    }

    /* 结束 */
    /* to {
        transform: translateX(0);
    } */
    100% {
        transform: translateX(0);
    }
}


.box2 {
    width: 500px;
    height: 500px;
    border: 2px solid;
}

.box3 {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-image: radial-gradient(circle at 70% 25%, #fff, pink);
    animation: moveBall 10s infinite linear;
}

@keyframes moveBall {
    20% {
        transform: translate(150px, 400px);
    }

    40% {
        transform: translate(400px, 150px);
    }

    60% {
        transform: translate(0, 150px);
    }

    80% {
        transform: translate(400px, 400px);
    }

    100% {
        transform: translate(0, 0);
    }
}

ul {
    padding: 0;
    width: 800px;
    height: 80px;
    background-color: rgb(28, 12, 12);
    color: #999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
}

ul>li {
    transition: 1s;
    position: relative;
    line-height: 80px;
}

ul>li:hover {
    color: #fff;
}


ol {
    width: 150px;
    list-style: none;
    position: absolute;
    left: -75px;
    top: 80px;
}

ol>li {
    margin: 2px;
    height: 60px;
    background-color: rgba(0, 0, 0, .5);
    text-align: center;
    line-height: 60px;
    color: #fff;
    transform: rotateY(180deg);
    opacity: 0;
    transition: 1s;
}

ol>li:nth-child(1) {
    transition-delay: 400ms;
}

ol>li:nth-child(2) {
    transition-delay: 200ms;
}

ol>li:nth-child(3) {
    transition-delay: 0ms;
}

ul>li:hover ol>li {
    transform: rotateX(0);
    opacity: 1;
}

ul>li:hover ol>li:nth-child(1) {
    transition-delay: 0ms;
}
ul>li:hover ol>li:nth-child(2) {
    transition-delay: 200ms;
}

ul>li:hover ol>li:nth-child(3) {
    transition-delay: 400ms;
}